package com.test.ita;

/**
 * Created by IntelliJ IDEA.
 * User: gpss
 * Date: 7/18/11
 * Time: 10:57 PM
 * To change this template use File | Settings | File Templates.
 */
public class CombinationBean {
    private String combination;
    private int cost;

    private void setCost () {
        if (combination != null && combination.length() > 0) {
            char[] combArr = combination.toCharArray();
            for (Character c : combArr) {
                if (Utils.consonents.contains(c)) {
                    cost += 5;
                }
                if (Utils.vowels.contains(c)) {
                    cost += 1;
                }
            }

        }
    }

    public CombinationBean (String combination) {
        this.combination = combination;
        this.setCost();
    }

    public String getCombination() {
        return combination;
    }

    public int getCost() {
        return cost;
    }
}
